<div class="x_panel">
  <div class="x_content" style="display: block;">
    <!--表格主体内容-->
    <div class="row-fluid">
      <form action="/order/index.html" method="get">
        <label class="control-label">名称</label>
        <input type="text" class="form-control-new" name="form[course_name]" value="{if isset($query.course_name)}{$query.course_name}{/if}">
        <label class="control-label">用户角色</label>
        <select  class="form-control-new" name="form[user_status]" >
          <option {if !isset($query.user_status) || $query.user_status==-1}selected="selected"{/if} value="-1">全部</option>
          <option {if isset($query.user_status) && $query.user_status==1}selected="selected"{/if} value="1">学生</option>
          <option {if isset($query.user_status) && $query.user_status==0}selected="selected"{/if} value="0">游客</option>
        </select>
        <label class="control-label">开始时间:</label>
          <input type="text"  name="form[start_time]" placeholder="开始时间" id="J_dh_start" class="form-control-new" value="{if isset($query.start_time)}{$query.start_time}{/if}">
        <label class="control-label">结束时间:</label>
          <input type="text"  name="form[end_time]" placeholder="结束时间" id="J_dh_end" class="form-control-new" value="{if isset($query.end_time)}{$query.end_time}{/if}">
        <button type="submit" class="btn btn-primary" style="">搜索</button>
      </form>
    </div>
    <br><br>
    <div class="cont">
      <table class="table table-bordered table-striped">
        <thead>
        <tr>
          <th width="100px">ID</th>
          <th>课程名称</th>
          <th>金额</th>
          <th>用户昵称</th>
          <th>用户角色</th>
          <th>购买时间</th>
        </tr>
        </thead>
        <tbody>
        {foreach $order.lists as $orderitem}
        <tr>
          <td>{$orderitem.order_id}</td>
          <td>{$orderitem.course_name}</td>
          <td>{$orderitem.order_amount}</td>
          <td>{base64_decode($orderitem.nick_name)}</td>
          <td>{if $orderitem.user_status}学生{else}游客{/if}</td>
          <td>{$orderitem.order_time}</td>
        </tr>
        {/foreach}
        </tbody>
      </table>
      <!--分页-->

      {Yii::$app->view->render('/com/pager.php',['pager'=>$order['pager']])}
    </div>
  </div>
</div>

